package com.hsmpay.mobile.service.system.impl;

import com.hsmpay.common.service.impl.BaseServiceSupport;
import com.hsmpay.mobile.dao.system.SystemDataDao;
import com.hsmpay.mobile.pojo.system.SystemData;
import com.hsmpay.mobile.service.system.SystemDataService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.io.Serializable;
import java.util.List;

/**
 * 数据字典 服务接口实现类
 */
@Service("systemDataService")
public class SystemDataServiceImpl<Entity extends Serializable, Query extends Object> extends BaseServiceSupport<Entity, Query> implements SystemDataService<Entity, Query> {
    @Resource(name = "systemDataDao")
    private SystemDataDao<SystemData, Long> systemDataDao;

    /**
     * 根据类型 查询数据字典列表
     *
     * @param type
     * @return
     * @throws Exception
     */
    public List<SystemData> getSystemDataList(String type) throws Exception {
        SystemData params = new SystemData();
        params.setType(type);
        return systemDataDao.searchEntityList(params);
    }


}